package com.chinanet.controller.manager;

import com.chinanet.annotation.JsonArg;
import com.chinanet.entry.manager.Article;
import com.chinanet.entry.manager.Defect;
import com.chinanet.service.manager.imp.IDefectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/defects/operation")
public class DefectController {

    @Autowired
    private IDefectService defectService;


    @RequestMapping(value = "/article", method = RequestMethod.POST)
    public long saveDefectAndArticle(@JsonArg("defect") Defect defect, @JsonArg("article") Article article) {
        return defectService.saveDefectAndArticle(defect, article);
    }

}
